"""
关闭弹窗
"""
from selenium.webdriver.common.by import By

elements = '/html/body/div[5]/div[1]/div[2]/i'
# elements = '//*[@id="boss-dynamic-dialog-1ii62406s"]/div[1]/div[2]/i'


def closed(driver):

    try:
        next_element = driver.find_element(By.XPATH, elements)
        next_element.click()
    except Exception as e:
        print(f"关闭弹窗失败: {e}")
        return False
